<?php

namespace app\admin\model;

use think\Model;

/**
 * XInsurance
 * @controllerUrl 'xInsurance'
 */
class XInsurance extends Model
{
    // 表主键
    protected $pk = 'POLICYNO';
    
    // 表名
    protected $table = 'x_insurance';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = false;

    protected $createTime = false;
    protected $updateTime = false;



    public function getNoteAttr($value, $row)
    {
        return !$value ? '' : $value;
    }

    public function getDemoAttr($value, $row)
    {
        return !$value ? '' : $value;
    }
    public function pot(){
            return    $this->hasMany('XINSURANCEPOT','POLICYNO','POLICYNO');

    }
    public function claims (){
        return    $this->hasMany('XClaims','POLICYNO','POLICYNO');

    }
}